# Contributor: dai9ah <dai9ah@protonmail.com>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=xsel
pkgver=1.2.1
pkgrel=0
pkgdesc="Command-line program for manipulating the X selection"
url="http://www.vergenet.net/~conrad/software/xsel"
arch="all"
license="MIT"
makedepends="autoconf automake libtool libxt-dev"
provider_priority=100  # highest (other provider of cmd:xsel is wl-clipboard-x11)
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/kfish/xsel/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	./xsel --help > /dev/null
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
549874679a2d2979fca851ce762870165f5cbe60ba3f15e0690080506a78ea0b2c52833bbf7868eb3988fc377a103c31c62367fb9c5d1eb606e0660985f82ca4  xsel-1.2.1.tar.gz
"
